package cn.tang.tframe.sdm.domain;

import cn.tang.tframe.common.base.PageInfo;
import lombok.Data;

/**
 * Created by tanghc on 17/1/18.
 */
@Data
public class PageParam implements IPageParam {

	private static final long serialVersionUID = -1814386602814823064L;
	private Integer pageNo;
	private Integer pageSize;
	public PageInfo getPageInfo(){
		if(pageNo == null || pageNo < 1){
			pageNo = 1;
		}
		if(null == pageSize || pageSize < 1){
			pageSize = 10;
		}
		return PageInfo.fromPageAndSize(pageNo,pageSize);
	}
}
